import request from "@/utils/request"

// 1.获取部门信息
export const getDepartments = ()=>request({url:'/company/department'});


// 2.删除部门功能实现
export const delDepartments = (id)=>request({url:`/company/department/${id}`,method:'delete'});


// 3.新增部门
export const addDepartments = (data)=>request({  url: '/company/department',method:"post",data});


// 4.获取部门的细节信息

export const editDepartments = (id)=>request({url:`/company/department/${id}`,method:'get'})


// 5 编辑部门提交

export const updateDepartments = (data)=>request({url: `/company/department/${data.id}`,data,method:'put'});